﻿using parkMonitor.viewModel.devInfoPanel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace parkMonitor.viewModel {
	/// <summary>监控面板</summary>
	public class MonitorPanelVM : INotifyPropertyChanged {
		public MonitorPanelVM() {
			CentralStatus = new PcStatusPanelVM();
			WebServer = new ComInfoCountPanelVM();
			NumMachine = new ComInfoCountPanelVM();
			Laser = new ComInfoCountPanelVM();
			Tray = new ComInfoCountPanelVM();
			Robot = new ComInfoCountPanelVM();
			Raster = new ComInfoCountPanelVM();
			Ultrasonic = new ComInfoCountPanelVM();
			Garage = new ComInfoCountPanelVM();
			Car = new ComInfoCountPanelVM();
		}
		/// <summary>中控pc状态</summary>
		public PcStatusPanelVM CentralStatus { get; private set; }

		/// <summary>Web服务器</summary>
		public ComInfoCountPanelVM WebServer { get; private set; }

		/// <summary>号牌机</summary>
		public ComInfoCountPanelVM NumMachine { get; private set; }

		/// <summary>激光</summary>
		public ComInfoCountPanelVM Laser { get; private set; }

		/// <summary>托盘</summary>
		public ComInfoCountPanelVM Tray { get; private set; }

		/// <summary>抓手</summary>
		public ComInfoCountPanelVM Robot { get; private set; }

		/// <summary>光栅</summary>
		public ComInfoCountPanelVM Raster { get; private set; }

		/// <summary>超声波</summary>
		public ComInfoCountPanelVM Ultrasonic { get; private set; }

		/// <summary>车库</summary>
		public ComInfoCountPanelVM Garage { get; private set; }

		/// <summary>车辆</summary>
		public ComInfoCountPanelVM Car { get; private set; }

		public virtual event PropertyChangedEventHandler PropertyChanged;
		public virtual void FirePropertyChanged(string propertyName) {
			if(PropertyChanged != null) {
				PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
